﻿<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
  <!-- EF Runtime content -->
  <edmx:Runtime>
    <!-- SSDL content -->
    <edmx:StorageModels>
      <Schema Namespace="Хранилище Sport_OrdersDBModel" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
        <EntityType Name="Admins">
          <Key>
            <PropertyRef Name="ID_admin" />
          </Key>
          <Property Name="ID_admin" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="loginAdmin" Type="nvarchar" MaxLength="80" Nullable="false" />
          <Property Name="passAdmin" Type="nvarchar" MaxLength="100" Nullable="false" />
        </EntityType>
        <EntityType Name="Orders">
          <Key>
            <PropertyRef Name="ID_order" />
          </Key>
          <Property Name="ID_order" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="ID_station" Type="int" Nullable="false" />
          <Property Name="statusOrd" Type="nvarchar" MaxLength="10" Nullable="false" />
          <Property Name="dateOrd" Type="datetime" Nullable="false" />
          <Property Name="countOrd" Type="int" Nullable="false" />
        </EntityType>
        <EntityType Name="Station">
          <Key>
            <PropertyRef Name="ID_station" />
          </Key>
          <Property Name="ID_station" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="addressSt" Type="nvarchar" MaxLength="100" Nullable="false" />
        </EntityType>
        <EntityType Name="Tovar">
          <Key>
            <PropertyRef Name="ID_tovar" />
          </Key>
          <Property Name="ID_tovar" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="photo" Type="nvarchar(max)" />
          <Property Name="nameTovar" Type="nvarchar" MaxLength="100" Nullable="false" />
          <Property Name="vendor" Type="nvarchar" MaxLength="100" Nullable="false" />
          <Property Name="price" Type="int" Nullable="false" />
          <Property Name="discount" Type="int" />
          <Property Name="countTovar" Type="int" Nullable="false" />
        </EntityType>
        <EntityType Name="TovarsToOrder">
          <Key>
            <PropertyRef Name="ID_tovarsToOrder" />
          </Key>
          <Property Name="ID_tovarsToOrder" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="ID_tovar" Type="int" Nullable="false" />
          <Property Name="ID_order" Type="int" Nullable="false" />
        </EntityType>
        <Association Name="FK_Station">
          <End Role="Station" Type="Self.Station" Multiplicity="1" />
          <End Role="Orders" Type="Self.Orders" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Station">
              <PropertyRef Name="ID_station" />
            </Principal>
            <Dependent Role="Orders">
              <PropertyRef Name="ID_station" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK1_TovarsToOrder">
          <End Role="Tovar" Type="Self.Tovar" Multiplicity="1" />
          <End Role="TovarsToOrder" Type="Self.TovarsToOrder" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Tovar">
              <PropertyRef Name="ID_tovar" />
            </Principal>
            <Dependent Role="TovarsToOrder">
              <PropertyRef Name="ID_tovar" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK2_TovarsToOrder">
          <End Role="Orders" Type="Self.Orders" Multiplicity="1" />
          <End Role="TovarsToOrder" Type="Self.TovarsToOrder" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Orders">
              <PropertyRef Name="ID_order" />
            </Principal>
            <Dependent Role="TovarsToOrder">
              <PropertyRef Name="ID_order" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityContainer Name="Хранилище Sport_OrdersDBModelContainer">
          <EntitySet Name="Admins" EntityType="Self.Admins" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="Orders" EntityType="Self.Orders" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="Station" EntityType="Self.Station" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="Tovar" EntityType="Self.Tovar" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="TovarsToOrder" EntityType="Self.TovarsToOrder" Schema="dbo" store:Type="Tables" />
          <AssociationSet Name="FK_Station" Association="Self.FK_Station">
            <End Role="Station" EntitySet="Station" />
            <End Role="Orders" EntitySet="Orders" />
          </AssociationSet>
          <AssociationSet Name="FK1_TovarsToOrder" Association="Self.FK1_TovarsToOrder">
            <End Role="Tovar" EntitySet="Tovar" />
            <End Role="TovarsToOrder" EntitySet="TovarsToOrder" />
          </AssociationSet>
          <AssociationSet Name="FK2_TovarsToOrder" Association="Self.FK2_TovarsToOrder">
            <End Role="Orders" EntitySet="Orders" />
            <End Role="TovarsToOrder" EntitySet="TovarsToOrder" />
          </AssociationSet>
        </EntityContainer>
      </Schema>
    </edmx:StorageModels>
    <!-- CSDL content -->
    <edmx:ConceptualModels>
      <Schema Namespace="Sport_OrdersDBModel" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
        <EntityType Name="Admins">
          <Key>
            <PropertyRef Name="ID_admin" />
          </Key>
          <Property Name="ID_admin" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="loginAdmin" Type="String" MaxLength="80" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="passAdmin" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
        </EntityType>
        <EntityType Name="Orders">
          <Key>
            <PropertyRef Name="ID_order" />
          </Key>
          <Property Name="ID_order" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="ID_station" Type="Int32" Nullable="false" />
          <Property Name="statusOrd" Type="String" MaxLength="10" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="dateOrd" Type="DateTime" Nullable="false" Precision="3" />
          <Property Name="countOrd" Type="Int32" Nullable="false" />
          <NavigationProperty Name="Station" Relationship="Self.FK_Station" FromRole="Orders" ToRole="Station" />
          <NavigationProperty Name="TovarsToOrder" Relationship="Self.FK2_TovarsToOrder" FromRole="Orders" ToRole="TovarsToOrder" />
        </EntityType>
        <EntityType Name="Station">
          <Key>
            <PropertyRef Name="ID_station" />
          </Key>
          <Property Name="ID_station" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="addressSt" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
          <NavigationProperty Name="Orders" Relationship="Self.FK_Station" FromRole="Station" ToRole="Orders" />
        </EntityType>
        <EntityType Name="Tovar">
          <Key>
            <PropertyRef Name="ID_tovar" />
          </Key>
          <Property Name="ID_tovar" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="photo" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
          <Property Name="nameTovar" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="vendor" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="price" Type="Int32" Nullable="false" />
          <Property Name="discount" Type="Int32" />
          <Property Name="countTovar" Type="Int32" Nullable="false" />
          <NavigationProperty Name="TovarsToOrder" Relationship="Self.FK1_TovarsToOrder" FromRole="Tovar" ToRole="TovarsToOrder" />
        </EntityType>
        <EntityType Name="TovarsToOrder">
          <Key>
            <PropertyRef Name="ID_tovarsToOrder" />
          </Key>
          <Property Name="ID_tovarsToOrder" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="ID_tovar" Type="Int32" Nullable="false" />
          <Property Name="ID_order" Type="Int32" Nullable="false" />
          <NavigationProperty Name="Orders" Relationship="Self.FK2_TovarsToOrder" FromRole="TovarsToOrder" ToRole="Orders" />
          <NavigationProperty Name="Tovar" Relationship="Self.FK1_TovarsToOrder" FromRole="TovarsToOrder" ToRole="Tovar" />
        </EntityType>
        <Association Name="FK_Station">
          <End Role="Station" Type="Self.Station" Multiplicity="1" />
          <End Role="Orders" Type="Self.Orders" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Station">
              <PropertyRef Name="ID_station" />
            </Principal>
            <Dependent Role="Orders">
              <PropertyRef Name="ID_station" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK2_TovarsToOrder">
          <End Role="Orders" Type="Self.Orders" Multiplicity="1" />
          <End Role="TovarsToOrder" Type="Self.TovarsToOrder" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Orders">
              <PropertyRef Name="ID_order" />
            </Principal>
            <Dependent Role="TovarsToOrder">
              <PropertyRef Name="ID_order" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK1_TovarsToOrder">
          <End Role="Tovar" Type="Self.Tovar" Multiplicity="1" />
          <End Role="TovarsToOrder" Type="Self.TovarsToOrder" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Tovar">
              <PropertyRef Name="ID_tovar" />
            </Principal>
            <Dependent Role="TovarsToOrder">
              <PropertyRef Name="ID_tovar" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityContainer Name="Entities" annotation:LazyLoadingEnabled="true">
          <EntitySet Name="Admins" EntityType="Self.Admins" />
          <EntitySet Name="Orders" EntityType="Self.Orders" />
          <EntitySet Name="Station" EntityType="Self.Station" />
          <EntitySet Name="Tovar" EntityType="Self.Tovar" />
          <EntitySet Name="TovarsToOrder" EntityType="Self.TovarsToOrder" />
          <AssociationSet Name="FK_Station" Association="Self.FK_Station">
            <End Role="Station" EntitySet="Station" />
            <End Role="Orders" EntitySet="Orders" />
          </AssociationSet>
          <AssociationSet Name="FK2_TovarsToOrder" Association="Self.FK2_TovarsToOrder">
            <End Role="Orders" EntitySet="Orders" />
            <End Role="TovarsToOrder" EntitySet="TovarsToOrder" />
          </AssociationSet>
          <AssociationSet Name="FK1_TovarsToOrder" Association="Self.FK1_TovarsToOrder">
            <End Role="Tovar" EntitySet="Tovar" />
            <End Role="TovarsToOrder" EntitySet="TovarsToOrder" />
          </AssociationSet>
        </EntityContainer>
      </Schema>
    </edmx:ConceptualModels>
    <!-- C-S mapping content -->
    <edmx:Mappings>
      <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
        <EntityContainerMapping StorageEntityContainer="Хранилище Sport_OrdersDBModelContainer" CdmEntityContainer="Entities">
          <EntitySetMapping Name="Admins">
            <EntityTypeMapping TypeName="Sport_OrdersDBModel.Admins">
              <MappingFragment StoreEntitySet="Admins">
                <ScalarProperty Name="ID_admin" ColumnName="ID_admin" />
                <ScalarProperty Name="loginAdmin" ColumnName="loginAdmin" />
                <ScalarProperty Name="passAdmin" ColumnName="passAdmin" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Orders">
            <EntityTypeMapping TypeName="Sport_OrdersDBModel.Orders">
              <MappingFragment StoreEntitySet="Orders">
                <ScalarProperty Name="ID_order" ColumnName="ID_order" />
                <ScalarProperty Name="ID_station" ColumnName="ID_station" />
                <ScalarProperty Name="statusOrd" ColumnName="statusOrd" />
                <ScalarProperty Name="dateOrd" ColumnName="dateOrd" />
                <ScalarProperty Name="countOrd" ColumnName="countOrd" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Station">
            <EntityTypeMapping TypeName="Sport_OrdersDBModel.Station">
              <MappingFragment StoreEntitySet="Station">
                <ScalarProperty Name="ID_station" ColumnName="ID_station" />
                <ScalarProperty Name="addressSt" ColumnName="addressSt" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Tovar">
            <EntityTypeMapping TypeName="Sport_OrdersDBModel.Tovar">
              <MappingFragment StoreEntitySet="Tovar">
                <ScalarProperty Name="ID_tovar" ColumnName="ID_tovar" />
                <ScalarProperty Name="photo" ColumnName="photo" />
                <ScalarProperty Name="nameTovar" ColumnName="nameTovar" />
                <ScalarProperty Name="vendor" ColumnName="vendor" />
                <ScalarProperty Name="price" ColumnName="price" />
                <ScalarProperty Name="discount" ColumnName="discount" />
                <ScalarProperty Name="countTovar" ColumnName="countTovar" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="TovarsToOrder">
            <EntityTypeMapping TypeName="Sport_OrdersDBModel.TovarsToOrder">
              <MappingFragment StoreEntitySet="TovarsToOrder">
                <ScalarProperty Name="ID_tovarsToOrder" ColumnName="ID_tovarsToOrder" />
                <ScalarProperty Name="ID_tovar" ColumnName="ID_tovar" />
                <ScalarProperty Name="ID_order" ColumnName="ID_order" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
        </EntityContainerMapping>
      </Mapping>
    </edmx:Mappings>
  </edmx:Runtime>
  <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
  <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
    <Connection>
      <DesignerInfoPropertySet>
        <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
      </DesignerInfoPropertySet>
    </Connection>
    <Options>
      <DesignerInfoPropertySet>
        <DesignerProperty Name="ValidateOnBuild" Value="true" />
        <DesignerProperty Name="EnablePluralization" Value="false" />
        <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
        <DesignerProperty Name="UseLegacyProvider" Value="false" />
        <DesignerProperty Name="CodeGenerationStrategy" Value="Нет" />
      </DesignerInfoPropertySet>
    </Options>
    <!-- Diagram content (shape and connector positions) -->
    <Diagrams></Diagrams>
  </Designer>
</edmx:Edmx>